<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<link rel="stylesheet" type="text/css" media="screen" href="../../css/bootstrap.min.css">
</head>
<body>
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
	<form class="form-horizontal" onsubmit="return false" id="form">
		<fieldset>
			<div class='form-group'>
				<label class='col-md-2 control-label'>regsterappid</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='regsterappid' type='text' name='regsterappid' id='regsterappid' data-bv-notempty='true' data-bv-notempty-message='regsterappid 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>regno</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='regno' type='text' name='regno' id='regno' data-bv-notempty='true' data-bv-notempty-message='regno 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>channel</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='channel' type='text' name='channel' id='channel' data-bv-notempty='true' data-bv-notempty-message='channel 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>hostcode</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='hostcode' type='text' name='hostcode' id='hostcode' data-bv-notempty='true' data-bv-notempty-message='hostcode 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>deptcode1</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='deptcode1' type='text' name='deptcode1' id='deptcode1' data-bv-notempty='true' data-bv-notempty-message='deptcode1 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>deptcode2</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='deptcode2' type='text' name='deptcode2' id='deptcode2' data-bv-notempty='true' data-bv-notempty-message='deptcode2 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>cardno</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='cardno' type='text' name='cardno' id='cardno' data-bv-notempty='true' data-bv-notempty-message='cardno 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>cardtype</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='cardtype' type='text' name='cardtype' id='cardtype' data-bv-notempty='true' data-bv-notempty-message='cardtype 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>patientname</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='patientname' type='text' name='patientname' id='patientname' data-bv-notempty='true' data-bv-notempty-message='patientname 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>idcard</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='idcard' type='text' name='idcard' id='idcard' data-bv-notempty='true' data-bv-notempty-message='idcard 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>idcardtype</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='idcardtype' type='text' name='idcardtype' id='idcardtype' data-bv-notempty='true' data-bv-notempty-message='idcardtype 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>sex</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='sex' type='text' name='sex' id='sex' data-bv-notempty='true' data-bv-notempty-message='sex 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>birthday</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='birthday' type='text' name='birthday' id='birthday' data-bv-notempty='true' data-bv-notempty-message='birthday 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>areacode</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='areacode' type='text' name='areacode' id='areacode' data-bv-notempty='true' data-bv-notempty-message='areacode 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>doctorcode</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='doctorcode' type='text' name='doctorcode' id='doctorcode' data-bv-notempty='true' data-bv-notempty-message='doctorcode 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>titletype</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='titletype' type='text' name='titletype' id='titletype' data-bv-notempty='true' data-bv-notempty-message='titletype 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>regdate</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='regdate' type='text' name='regdate' id='regdate' data-bv-notempty='true' data-bv-notempty-message='regdate 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>reghalf</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='reghalf' type='text' name='reghalf' id='reghalf' data-bv-notempty='true' data-bv-notempty-message='reghalf 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>reghour</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='reghour' type='text' name='reghour' id='reghour' data-bv-notempty='true' data-bv-notempty-message='reghour 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>regtype</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='regtype' type='text' name='regtype' id='regtype' data-bv-notempty='true' data-bv-notempty-message='regtype 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>extparam</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='extparam' type='text' name='extparam' id='extparam' data-bv-notempty='true' data-bv-notempty-message='extparam 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>phone</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='phone' type='text' name='phone' id='phone' data-bv-notempty='true' data-bv-notempty-message='phone 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>extparam1</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='extparam1' type='text' name='extparam1' id='extparam1' data-bv-notempty='true' data-bv-notempty-message='extparam1 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>Column25</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='Column25' type='text' name='Column25' id='Column25' data-bv-notempty='true' data-bv-notempty-message='Column25 不能为空'>
				</div>
			</div>


			<div class="form-actions">
				<div class="row" align="center">
					<div class="col-md-12">
					    <button class="btn btn-primary" onclick="location.href='appApponitList.html'">返回</button>
						<button class="btn btn-primary" type="submit" onclick="add()">
							<i class="fa fa-save"></i> 保存
						</button>
					</div>
				</div>
			</div>

		</fieldset>
	</form>
</div>
	<script type="text/javascript" src="../../js/libs/jquery-2.1.1.min.js"></script>
	<script type="text/javascript" src="../../js/jq.js"></script>
	<script type="text/javascript" src="../../js/plugin/bootstrapvalidator/bootstrapValidator.min.js"></script>
	<script type="text/javascript" src="../../js/common.js"></script>
	<script type="text/javascript" src="../../layui/layui.js"></script>
	<script type="text/javascript">
		layui.use(['layer','laydate'], function(){
		    var layer = layui.layer;
		});
		
		function add() {
			$('#form').bootstrapValidator();
			var bootstrapValidator = $("#form").data('bootstrapValidator');
			bootstrapValidator.validate();
		    if(!bootstrapValidator.isValid()){
			   return;
		    }
		    
		    var formdata = $("#form").serializeObject();

			$.ajax({
				type : 'post',
				url : '/appApponits',
				contentType: "application/json; charset=utf-8",  
				data : JSON.stringify(formdata),
				success : function(data) {
					layer.msg("添加成功", {shift: -1, time: 1000}, function(){
                        location.href = "appApponitList.html";
                    });
				}
			});
		}
		
	</script>
</body>
</html>
